"""
任务名称
name: 快手开宝箱
定时规则
cron: 0 0 * * * ?
"""
import os
import requests

url = "https://nebula.kuaishou.com/rest/wd/encourage/unionTask/treasureBox/report"

NS_sig3=os.environ.get("NS_sig3")
KSCookie=os.environ.get("KSCookie")
querystring = {"__NS_sig3":NS_sig3,"sigCatVer":"1"}
payload = {}
headers = {
    "Cookie": KSCookie,
    "User-Agent": "PostmanRuntime-ApipostRuntime/1.1.0"
}

try:
    response = requests.post(url,json=payload,  headers=headers, params=querystring)
    response.raise_for_status()  # 检查请求是否成功
    print(response.text)
except requests.exceptions.RequestException as e:
    print(f"请求失败: {e}")